var arr = [{
    name:'tom',
    telephone:123456789
},{
    name:'terry',
   telephone:1234253563
},{
    name:'larry',
    telephone:123459876
},{
    name:'fairy',
    telephone:987564321
}];
//抽奖
//随机数 [0-4)   [0,1)
/* console.log(Math.random()*4);
console.log(Math.random()*4);
console.log(Math.random()*4);
console.log(Math.floor(Math.random()*4)); */
var index = Math.floor(Math.random()*arr.length);
console.log(arr[index].telephone);






/* var arr2 = [];
for(var i=0;i<arr.length;i++){
    arr2.push(arr[i].name)  
}
console.log(arr2); */

